﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ExecutionContract
{
    public interface IExecutionContractReader
    {
        /// <summary>
        /// Adds a type to the reader. I the same type was added before thecessary reader will return false and the type will not be added to the reader. This is to avoid unnecessary operations of the reader. 
        /// </summary>
        /// <param name="TypeToCheck">Type that shall be added to the reader.</param>
        /// <returns>bool parameter that describes if the type was added or not.</returns>
        bool Add(Type TypeToCheck);

        /// <summary>
        /// Check if the type is already added to the reader so that it is not necessary to add the type again.
        /// </summary>
        /// <param name="TypeToCheck">Type that should be checked</param>
        /// <returns>bool that describes if it is necessary to add the type</returns>
        bool AddNecessary(Type TypeToCheck);

        /// <summary>
        /// This methods goes through all assigend types and checks whether the types contain any ExecutionContractMemberAttribute.
        /// </summary>
        /// <returns>List of all members that contain a ExecutionContractMemberAttribute</returns>
        List<ExecutionContract> Read();
    }
}
